﻿@model PublishNews.Models.ChangePasswordModel

@{
    ViewBag.Title = "ChangePassword";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="col-md-6">

    <h2>ChangePassword</h2>
    @if (Model.Succeeded)
    {
        <label>Update successfully</label>
    }
    else
     {

          using (Html.BeginForm())
          {
              @Html.AntiForgeryToken()
              @Html.ValidationSummary(true)

              <fieldset>
                  @Html.HiddenFor(model => model.UserId)

                  <div class="form-group">
                      @Html.LabelFor(model => model.CurrentPassword)
                      @Html.PasswordFor(model => model.CurrentPassword, new {@class = "form-control"})
                      @Html.ValidationMessageFor(model => model.CurrentPassword)
                  </div>

                  <div class="form-group">
                      @Html.LabelFor(model => model.NewPassword)
                      @Html.PasswordFor(model => model.NewPassword, new {@class = "form-control"})
                      @Html.ValidationMessageFor(model => model.NewPassword)
                  </div>
                  <p>
                      <input class="btn btn-primary" type="submit" value="Save" />
                  </p>
              </fieldset>
          }
     }

    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
</div>
